<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<link rel="stylesheet" href="css/form.css" />
</head>

<body>
	<div id="header-wrap" data-mn=0>
		<a href="###" data-link="home" data-type="ico" class="left ico-m ico-home"></a>
		<h2>登录</h2>
		<a href="###" data-link="register" class="right btn b-small b-blue">注册</a>
	</div>
	<div id="" class>
		<div class="tips">
			<div class="t-error" style="display: none;"></div>
		</div>
		<form>
		<ul class="form-list">
			<li class="ico-m ico-pl ico-mobile" data-type="ico">
				<div class="fl-cont form-input">
					<input id="id_input" type="text" placeholder="请输入手机号" />
				</div>
			</li>
			<li class="ico-m ico-pl ico-lock" data-type="ico">
				<div class="fl-cont form-input">
					<input id="pw_input" type="password" placeholder="请输入密码" />
				</div>
			</li>
		</ul>
		<div class="">
			<a href="###" data-cookie="login,1,1" data-link="back" class="btn b-red"><span id="check" >登录</span></a>
			<a href="###" data-link="find" data-type="ico" class="ico-s ico-question ico-pl b-link btn right">找回密码</a>
		</div>
		</form>
	</div>
	<script>
	$(function(){
		var user_id = $.cookie("user_id");
		$("#id_input").val(user_id)
		$("#check").on("click",function(){
			var user_pw= $.cookie("user_pw");
			var pw_input = $("#pw_input").val();
			var id_input = $("#id_input").val();
			var check_return = $("#id_input").check({type:1});
			if(check_return == 0){
				$(".t-error").text("用户名是您的注册手机号，请输入正确格式的手机号").fadeIn(100)
				reset_tip()
				return false
			}else{
				if(id_input !== user_id || pw_input !== user_pw){
					$(".t-error").text("用户名或密码不对").fadeIn(100)
					reset_tip()
					return false
				}
			}
		})
	})
	</script>	
</body>

</html>
